<template>
	<view>
		<view class="z-padding-32 detail">
			<view class="title z-font-30 z-text-c z-margin-b-24">{{ info.title }}</view>
			<view class="time z-font-24 z-text-r z-margin-b-72">{{ tool.formatTime(info.createtime) }}</view>
			<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
import http from '../../utils/http';
export default {
	data() {
		return {
			id: '',
			info: ''
		};
	},
	onLoad(options) {
		this.id = options.id;
		this.getInfo();
		uni.setNavigationBarTitle({
			title: '公告详情'
		});
	},
	methods: {
		getInfo() {
			http.get('notice/detail', {
				id: this.id
			}).then((res) => {
				this.info = res.data;
			});
		}
	}
};
</script>

<style>
/* service/info/info.wxss */
page {
	background: #edf1f4;
}
.detail {
	overflow-y: auto;
}
.time {
	color: #a4a9b7;
}
</style>
